// 导入js模块
const fs=require('fs')
//创建 Promise 实例化对象
new Promise((resolve, reject) => {
    fs.readFile('./files/first.txt',(err, data) => {
        if (err) reject(err)
        resolve(data)
    })
}).then(value => {
    return new Promise((resolve, reject) => {
        fs.readFile('./files/second.txt',(err, data) => {
            if (err) reject(err)
            resolve([value,data])
        })
    })
}).then(value => {
    return new Promise((resolve, reject) => {
        fs.readFile('./files/third.txt',(err, data) => {
            if (err) reject(err)
            value.push(data)
            resolve(value)
        })
    })
}).then(value => {
    console.log(value.toString())
})